package demo.thread;

/**
 * @Author: tyzhang
 * @Description: 生产者
 * @Date: Created in 23:35 2018/3/13
 */
public class Player implements Runnable {
    private Movie m;

    public Player(Movie m) {
        super();
        this.m=m;
    }

    @Override
    public void run() {
        for (int i = 0; i < 20; i++) {
            if(0==i%2){
                m.play("左青龙");
            }else{
                m.play("右白虎");
            }
        }
    }
}
